import request from '@/utils/request.js'

// 获取菜单列表
export const getMenuList = (data) =>
    request.get('/user/menu/menuParentChildList/',{
        params: {
            "status": data.status,
            "menuName": data.menuName
        }
    })

// 查询目录
export const getMenuToML = () =>
    request.get('/user/menu/getMenuToML/')


// 查询目录二级菜单
export const getMenuToMLAZ = () =>
    request.get('/security/getRouters/')

// 新增菜单
export const addMenu = (data) =>
    request.post('/user/menu/saveMenu/', data)

// 删除菜单
export const deleteMenu = (menuId) =>
    request.delete('/user/menu/deleteMenu/', {params:{"menuId":menuId}})

// 修改菜单
export const updateMenu = (data) =>
    request.put('/user/menu/updateMenu/', data)
